﻿@model Stardust.Models.ProductoXAlmacenBean

@{
    ViewBag.Title = "Listado";
}

<h2>Modificar Productos</h2>
<p></p><p></p><p></p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>




 @using (Html.BeginForm("Guardarproductos2", "Producto", FormMethod.Post, new { @class = "form"}))
 {   
     @Html.HiddenFor(model => model.idalmacen) 
      @Html.HiddenFor(model => model.idhotel) 
    <fieldset>
        <div class="widget">
            <div class="title">
                <h6>Hotel</h6>
            </div>
            <div class="formRow"> @Html.LabelFor(model => model.Hotel)
                <div class=" formRight">  @Html.DisplayFor(model => model.Hotel) @Html.HiddenFor(model => model.Hotel)  </div> </div>
                <div class="clear"></div>
            </div>
            
            
        </div>
    </fieldset>
    

    <p></p><p></p><p></p><p></p>

    <div class="wrapper">
    <div class="widget">
      <div class="title">
      <h6>Lista de Productos</h6>
      </div>
      <div class="dataTables_wrapper">

        <table cellpadding = "0" cellspacing = "0" border="0" width = "100%" class = "display dTable"> @*cambiar*@
        <thead>
        <tr>
            <th class="ui-state-default" rowspan="1" colspan="1" style="width:160px;">
                <div class="DataTables_sort_wrapper">
                Producto
                <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                </div>
             </th>
            <th class="ui-state-default" rowspan="1" colspan="1" style="width:160px;" >
                <div class="DataTables_sort_wrapper">
                Stock Minimo
                <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                </div>
             </th>
               <th class="ui-state-default" rowspan="1" colspan="1" style="width:120px;" >
                <div class="DataTables_sort_wrapper">
                Stock Actual
                <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                </div>
             </th>
               <th class="ui-state-default" rowspan="1" colspan="1" style="width:120px;" >
                <div class="DataTables_sort_wrapper">
                Stock Máximo
                <span class="DataTables_sort_icon css_right ui-icon ui-icon-triangle-1-s"></span>
                </div>
             </th>
        </tr>
    </thead>

        <tbody>
            @for (int i = 0; i < Model.listProdalmacen.Count; i++)
            {

                 @Html.HiddenFor(model => model.listProdalmacen[i].ID) 
         
             <tr class="gradeA odd">       
                
                        <td class="sorting_1">@Html.DisplayFor(model => model.listProdalmacen[i].nombre) @Html.HiddenFor(model => model.listProdalmacen[i].nombre)</td>
                        <td> @Html.TextBoxFor(model => model.listProdalmacen[i].stockminimo)  @Html.ValidationMessageFor(model => model.listProdalmacen[i].stockminimo)        </td>
                        <td> @Html.TextBoxFor(model => model.listProdalmacen[i].stockactual)   @Html.ValidationMessageFor(model => model.listProdalmacen[i].stockactual)       </td>
                        <td class="center"> @Html.TextBoxFor(model => model.listProdalmacen[i].stockmaximo) @Html.ValidationMessageFor(model => model.listProdalmacen[i].stockmaximo)         </td>   
             </tr>

            }

    
    </tbody>
        </table>

      </div>
        
    </div>
    </div>
    

    <p></p><p></p><p></p><p></p>
    <p>
        <input type="submit" value="Guardar" class = "redB" />
        @Html.ActionLink("Regresar", "ListarProductosdeAlmacen/" + Model.idhotel, "Producto")
    </p>
 }

         